home *** CD-ROM | disk | FTP | other *** search
/ Amiga Collections: MegaDisc / MegaDisc 36 (1993-11)(MegaDisc Digital Publishing)(AU)(Disk 2 of 2).zip / MegaDisc 36 (1993-11)(MegaDisc Digital Publishing)(AU)(Disk 2 of 2).adf / ARexx / Modular / AddGad.mod < prev    next >
Text File  |  1993-08-19  |  1KB  |  24 lines

  1.     /* Add string or boolean gadget */
  2.     AddGad:
  3.      t = 'Edit the entry shown here to suit your needs. For a string',
  4.          '\gadget, retain all the commas, using two adjacent commas',
  5.          '\if you want no prompting text to appear in the gadget.',
  6.          '\\For a Boolean gadget, omit the size and the third comma,',
  7.          '\and include back-slashes to create multiple lines of text.',
  8.          '\\Irrespective of type, the first two gadgets you add here',
  9.          '\will be given jobs: the first will put the date and time in',
  10.          '\the title bar; the second will deactivate both the gadgets,',
  11.          '\though their images will remain in view.'
  12.      u = 'x,y,Prompting text,Horizontal size in pixels'
  13.      s = Request(50,20,t,u,'Okay','Cancel')
  14.      if s ~= '' then do
  15.       parse var s x ',' y ',' txt ',' size .
  16.      /* 'gadno' keeps a tally of added gadgets so that each has
  17.         a unique defining number. Then we can use them. */
  18.       gad = GetClip('gadno') ; gad = gad + 1
  19.       if size > 0 then call AddGadget(HO,x,y,gad,txt,'%l %d',size)
  20.                   else call AddGadget(HO,x,y,gad,txt,'%l %d %g')
  21.       reset = SetClip('gadno',gad)
  22.       end
  23.       return
  24.